import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  state: {
    isLogin: false,
    userInfo: {
    },
    code:'',
    active:'home'
  },
  mutations: {
    cactive(state, x) {
      this.state.active = x;
    },
    clogin(state, x) {
      this.state.isLogin = x;
    },
    cuser(state, x) {
      this.state.userInfo = x;
    },
    ccode(state, x) {
      this.state.code = x;
    }
  },
  //   actions,
  //   getters,
  //   modules: {},
  strict: debug,
  //   plugins: debug ? [createLogger()] : []
})